#define _CRT_SECURE_NO_WARNINGS 1
class Solution {
public:
    int multiply(int A, int B)
    {
        if (B == 0)
        {
            return 0;
        }
        if (B == 1)
        {
            return A;
        }
        return (A << 1) + multiply(A, B - 2);
    }
};